package com.bdqn.t313.service;

import com.bdqn.t313.dao.UserDao;
import com.bdqn.t313.pojo.User;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

@Service("userService")
public class UserServiceImpl implements UserService {

    //Logger logger = Logger.getLogger(UserServiceImpl.class);




    @Autowired
    @Qualifier("userDao")
    //@Resource：如果不指定name和type属性时，默认按照byName进行自动装配
    private UserDao userDao;


    @Override
    public int save(User user) {
        //logger.info("xxx用户执行新增用户信息.........");
        return userDao.save(user);
    }
}
